<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/pages/common/component.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>修改账户信息</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

<script type="text/javascript">


// 报表参数
var properties ;
eval("properties="+'<%=objLoginUser.getProperties()%>');

$(document).ready(function() {
	// 报表参数填充到form中
	$("#dayLineChartMin").val(properties.dayLineChartMin);
	$("#dayLineChartMax").val(properties.dayLineChartMax);
	$("#dayLineChartInterval").val(properties.dayLineChartInterval);
	$("#dayLineChartPlotLine1").val(properties.dayLineChartPlotLine1);
	$("#dayLineChartPlotLine2").val(properties.dayLineChartPlotLine2);
	$("#dayLineChartPlotLine3").val(properties.dayLineChartPlotLine3);
	
	$("#monthComboChartMin").val(properties.monthComboChartMin);
	$("#monthComboChartMax").val(properties.monthComboChartMax);
	$("#monthComboChartInterval").val(properties.monthComboChartInterval);
	$("#monthComboChartPlotLine1").val(properties.monthComboChartPlotLine1);
	$("#monthComboChartPlotLine2").val(properties.monthComboChartPlotLine2);
	$("#monthComboChartPlotLine3").val(properties.monthComboChartPlotLine3);
    // 校验主表单
    $("#pubUserForm").validationEngine();
});

function validateUserPwd(){
	$.ajax({
	    url: 'pubUserAction.do?method=validateUserPwd&password='+$('#password').val(),
	    type: 'GET',
	    dataType: 'text',
	    async : false,
	    cache: false,
	    error: function(){
	        alert('调用validatePwd方法出错!');
	    },
	    success: function(isTrue){
	    	if(isTrue == 'false'){
	    		return "用户密码不正确!";
	    	}
	    }
	});
}

</script>	
	
  </head>
  
  <body>
   
   <html:form styleId="pubUserForm" method="post" action="pubUserAction.do" target="_top">
    <input type="hidden" name="method" value="update"/>
    <input type="hidden" name="userId" value="${pubUserVO.userId }"/>
    <table width="40%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center" style="margin-top:8px">
		<tr align="center" bgcolor="#FAFAF1" height="22">
			<td colspan="2"><b>修改用户信息</b></td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td width="10%">ID</td>
			<td width="30%">
				${objLoginUser.userId }
			</td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td width="10%">用户名称</td>
			<td width="30%">
				<input class="validate[required]" id="name" name="name" style="width:30%;" value="${objLoginUser.name }"/>
			</td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td width="10%">电子邮箱</td>
			<td width="30%">
				<input class="validate[required,custom[email]]" id="email" name="email" style="width:30%;" value="${objLoginUser.email }"/>
			</td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td width="10%">登陆名称</td>
			<td width="30%">
				<input class="validate[required]" id="userName" name="userName" style="width:30%;" value="${objLoginUser.userName }"/>
			</td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td width="10%">原密码</td>
			<td width="30%">
				<input type="password" class="validate[required,ajax[ajaxCheckUserPassword]]" id="password" name="password" style="width:30%;" />
			</td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td width="10%">新密码</td>
			<td width="30%">
				<input type="password" class="validate[required,minSize[6],maxSize[12]]" id="newPassword" name="newPassword" style="width:30%;" />
			</td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td width="10%">再输入新密码</td>
			<td width="30%">
				<input type="password" class="validate[required,equals[newPassword]]" id="repNewPassword" name="repNewPassword" style="width:30%;" />
			</td>
		</tr>
		<tr align="center" bgcolor="#FAFAF1" height="22">
			<td colspan="2"><b>日多线图参数</b></td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td width="10%">最小额</td>
			<td width="30%">
				<input class="validate[required,custom[integer]]" id="dayLineChartMin" name="dayLineChartMin" style="width:30%;" />
			</td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td width="10%">最大额</td>
			<td width="30%">
				<input class="validate[required,custom[integer]]" id="dayLineChartMax" name="dayLineChartMax" style="width:30%;" />
			</td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td width="10%">跨度额</td>
			<td width="30%">
				<input class="validate[required,custom[integer]]" id="dayLineChartInterval" name="dayLineChartInterval" style="width:30%;" />
			</td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td width="10%">警戒线-正常</td>
			<td width="30%">
				<input class="validate[custom[integer]]" id="dayLineChartPlotLine1" name="dayLineChartPlotLine1" style="width:30%;" />
			</td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td width="10%">警戒线-提示</td>
			<td width="30%">
				<input class="validate[custom[integer]]" id="dayLineChartPlotLine2" name="dayLineChartPlotLine2" style="width:30%;" />
			</td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td width="10%">警戒线-警告</td>
			<td width="30%">
				<input class="validate[custom[integer]]" id="dayLineChartPlotLine3" name="dayLineChartPlotLine3" style="width:30%;" />
			</td>
		</tr>
		
		<tr align="center" bgcolor="#FAFAF1" height="22">
			<td colspan="2"><b>月综合图参数</b></td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td width="10%">最小额</td>
			<td width="30%">
				<input class="validate[required,custom[integer]]" id="monthComboChartMin" name="monthComboChartMin" style="width:30%;" />
			</td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td width="10%">最大额</td>
			<td width="30%">
				<input class="validate[required,custom[integer]]" id="monthComboChartMax" name="monthComboChartMax" style="width:30%;" />
			</td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td width="10%">跨度额</td>
			<td width="30%">
				<input class="validate[required,custom[integer]]" id="monthComboChartInterval" name="monthComboChartInterval" style="width:30%;" />
			</td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td width="10%">警戒线-正常</td>
			<td width="30%">
				<input class="validate[custom[integer]]" id="monthComboChartPlotLine1" name="monthComboChartPlotLine1" style="width:30%;" />
			</td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td width="10%">警戒线-提示</td>
			<td width="30%">
				<input class="validate[custom[integer]]" id="monthComboChartPlotLine2" name="monthComboChartPlotLine2" style="width:30%;" />
			</td>
		</tr>
		<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
			<td width="10%">警戒线-警告</td>
			<td width="30%">
				<input class="validate[custom[integer]]" id="monthComboChartPlotLine3" name="monthComboChartPlotLine3" style="width:30%;" />
			</td>
		</tr>
		<tr>
			<td colspan="2" align="center">
				<html:submit value="提交"></html:submit>
				&nbsp;&nbsp;&nbsp;
				<input type="button" value="返回" onclick="back2list();"> 
			</td>
		</tr>
    </table>
   </html:form> 
    
  </body>
</html>
